LassoScript Utility
Basics Browse Detail

[String->BeginsWith]

Tag Link [String->BeginsWith] Category String
Type Member Source Available No
Support Preferred Version 5.0
Change Unchanged Data Source Any
Output Type Boolean Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0

Description

[String->BeginsWith] returns True if the base string begins with the string parameter, False otherwise. Requires a single string parameter. The test is not case sensitive.

Syntax

[String Variable->(BeginsWith: 'Pattern String')]

Parameters

Required Parameters
Pattern String The pattern which should be checked.

Examples

To change the color of text if it begins with the word Blue:

Use the [String->BeginsWith] tag within [If] ... [/If] tags. If the field Company_Name begins with the word Blue then the company name is colored blue using <font> ... </font> tags, otherwise it is displayed normally.

[If: (Field: 'Company_Name')->(BeginsWith: 'Blue')]
  <font color="blue">[Field: 'Company_Name']</font>
[Else]
  [Field: 'Company_Name']
[/If]

<font color="blue">Blue World</font>

Related Tags

Category Tags